$(function(){
//	agenda.loadEvents();
	 $('#edit-entry').onetabload(agenda.loadEvents);
});

var agenda = {
	theme:'default',
	customRange: function(input) { 
    	return {minDate: (input.id == "date_fin" ? $("#date_debut").datepicker("getDate") : null), 
        		maxDate: (input.id == "date_debut" ? $("#date_fin").datepicker("getDate") : null)}; 
	}, 
	loadEvents:function(){
		
		$('#date_debut, #date_fin').datepicker({
			beforeShow: agenda.customRange, 
			showOn: "both", 
    		buttonImage: "images/date-picker.png", 
    		buttonImageOnly: true 
		});
		$('#date_debut, #date_fin').css({
			display:'inline',
			width:'100px'
		});
		$('.agenda-block img').css({
			position:'relative',
			left:'1px',
			'top':'4px'
		});
		
		
	}
};
